from datetime import datetime
from sqlalchemy import Column, Integer, String, Text, ForeignKey, DateTime
from sqlalchemy.orm import relationship
from Model.default import Base


class no_response(Base):
    __tablename__ = 'notice_no_response'

    id=Column(String(50),primary_key=True)
    #发送者只做标记不做具体信息
    sender_info=Column(String(50))
    #所属人
    user_id=Column(Integer,ForeignKey('user.id'),nullable=False,)
    #标题
    title=Column(String(50))
    #内容
    content=Column(Text)
    #时间,采用默认行为存储
    date=Column(DateTime,default=lambda: datetime.now().replace(microsecond=0))
    user=relationship('user')








